package net.dodoman.link;

public class LinkedList {

	int length = 0;

	ListNode firstNode;

	ListNode lastNode;

	public LinkedList() {
		ListNode node = new ListNode();
		node.id = -1;
		firstNode = node;
		lastNode=firstNode;
	}

	public int size() {
		return length;
	}

	void insertNode(int id) {
		ListNode node=new ListNode();
		node.id=id;
		lastNode.link=node;
		lastNode=node;
		length++;
	}

}
